using System;
using FluentNHibernate.Testing;
using NUnit.Framework;
using RMH.Entities;

namespace RMH.IntegrationTests.Repository
{
    [TestFixture]
    public class PaymentRepositorySpecs : RepositoryBaseSpecs
    {
        [Test]
        public void can_persist_all_properties()
        {
            new PersistenceSpecification<Payment>(GetSession())
                .CheckProperty(x => x.Type, PaymentType.SelfPay)
                .CheckProperty(x => x.Method, PaymentMethod.Cash)
                .CheckProperty(x => x.BillingDate, new DateTime(2009,2,2))
                .CheckProperty(x => x.ReceivedDate, new DateTime(2009, 2, 2))
                .CheckProperty(x => x.CheckNumber, "2323232")
                .CheckProperty(x => x.Amount, 55.22)                
                .VerifyTheMappings();
        }
    }
}